﻿using System.Data.Entity.ModelConfiguration;
using Nop.Core.Domain.ShowCase;

namespace Nop.Data.Mapping.ShowCase
{
    public class ShowCaseProductMapping:  EntityTypeConfiguration<ShowCaseProduct>
    {
        public ShowCaseProductMapping()
        {
            this.ToTable("ShowCaseProduct");
            this.HasKey(c => c.Id);
            this.Property(u => u.Title).HasMaxLength(1000);


            this.HasMany(b => b.Items)
                .WithRequired(p => p.ShowCaseProduct).WillCascadeOnDelete(false); 
        }
    }
}